package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.entity.OutOrder;
import com.project.service.OutOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "销售单接口")
@RequestMapping("outOrder")
public class OutOrderController {
    @Autowired
    private OutOrderService orderService;
    @ApiOperation(value = "动态条件分页查询销售单信息")
    @GetMapping("cutByItem/{pageNum}/{customName}/{startDate}/{endDate}")
    public IPage<OutOrder> cutByItem(@PathVariable("pageNum") Integer pageNum, @PathVariable("customName") String customName, @PathVariable("startDate") String  startDate, @PathVariable("endDate") String  endDate) {
       return orderService.cutByItem(pageNum, customName, startDate, endDate);
    }
}
